package com.itcast.service.impl;

import com.itcast.dao.BookDao;
import com.itcast.domain.Book;
import com.itcast.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BookDao bookDao;

    @Override
    public List<Book> findAll() {

        System.out.println("bookService执行了");

        return bookDao.findAll();
    }

    @Override
    public void upDate(int id) {
            bookDao.upDate(id);
    }

    @Override
    public Book findBook() {
        System.out.println("bookService执行了");
        return bookDao.findBook();
    }
}
